package com.kun.entity;

import java.io.Serializable;
import java.util.Date;

import com.alibaba.fastjson.annotation.JSONField;

@SuppressWarnings("serial")
public class Comment implements Serializable{
    private Integer id;

    private String userId;

    private Integer activityId;

    private Integer wishId;

    private Integer bookId;

    private String star;

    private Integer likes;

    private Integer isShow;

    @JSONField(format="yyyy-MM-dd hh:mm:ss")
    private Date addTime;

    private Integer fatherCommentid;

    private String picture;

    private Integer toId;

    private Integer sonComments;

    private String commentMsg;
    
    private User user;
    
    private Book book;
    
    private Wishing wishing;
    
    private Comment toComment;
    
    private String isCurrentUserLike;
    
    private String isCurrentUserComment;
    
    //layui分页参数 图书评论
    public String getNickName() {
    	if(user!=null){
    		return user.getNickname();
    	}else{
    		return null;
    	}
		
	}
    
    public String getBookName() {
    	if(book!=null){
    		return book.getBookname();
    	}else{
    		return null;
    	}
		
	}
    //end 图书评论
    
    //分页 许愿图书
    public String getWishBookName(){
    	if(wishing!=null){
    		return wishing.getBookName();
    	}else{
    		return null;
    	}
    }
    
    public String getWishBookAuthor(){
    	if(wishing!=null){
    		return wishing.getBookAuthor();
    	}else{
    		return null;
    	}
    }
    
    public String getWishBookPress(){
    	if(wishing!=null){
    		return wishing.getBookPress();
    	}else{
    		return null;
    	}
    }
    
    
    
	public String getIsCurrentUserLike() {
		return isCurrentUserLike;
	}

	public void setIsCurrentUserLike(String isCurrentUserLike) {
		this.isCurrentUserLike = isCurrentUserLike;
	}

	
	public String getIsCurrentUserComment() {
		return isCurrentUserComment;
	}

	public void setIsCurrentUserComment(String isCurrentUserComment) {
		this.isCurrentUserComment = isCurrentUserComment;
	}

	public Comment getToComment() {
		return toComment;
	}

	public void setToComment(Comment toComment) {
		this.toComment = toComment;
	}

	public Wishing getWishing() {
		return wishing;
	}

	public void setWishing(Wishing wishing) {
		this.wishing = wishing;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    public Integer getActivityId() {
        return activityId;
    }

    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    public Integer getWishId() {
        return wishId;
    }

    public void setWishId(Integer wishId) {
        this.wishId = wishId;
    }

    public Integer getBookId() {
        return bookId;
    }

    public void setBookId(Integer bookId) {
        this.bookId = bookId;
    }

    public String getStar() {
        return star;
    }

    public void setStar(String star) {
        this.star = star == null ? null : star.trim();
    }

    public Integer getLikes() {
        return likes;
    }

    public void setLikes(Integer likes) {
        this.likes = likes;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Integer getFatherCommentid() {
        return fatherCommentid;
    }

    public void setFatherCommentid(Integer fatherCommentid) {
        this.fatherCommentid = fatherCommentid;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture == null ? null : picture.trim();
    }

    public Integer getToId() {
		return toId;
	}

	public void setToId(Integer toId) {
		this.toId = toId;
	}

	public Integer getSonComments() {
        return sonComments;
    }

    public void setSonComments(Integer sonComments) {
        this.sonComments = sonComments;
    }

    public String getCommentMsg() {
        return commentMsg;
    }

    public void setCommentMsg(String commentMsg) {
        this.commentMsg = commentMsg == null ? null : commentMsg.trim();
    }
}